﻿using Scheduler.IServices;
using Scheduler.Model.ViewModels;

namespace Scheduler.Services
{
    public class ProxyOrder: IOrderProcessor
    {
        private readonly IOrderProcessor orderProcessor;
        public ProxyOrder()
        {
            orderProcessor=new OrderProcessor();
        }
        public void Submit(Order order)
        {
            Before();
            orderProcessor.Submit(order);
            After();

        }
        private void Before()
        {
            Console.WriteLine("代理：注册之前的逻辑");
        }

        private void After()
        {
            Console.WriteLine("代理：注册之后的逻辑");
        }
    }
}
